package day6;

import java.util.Scanner;

public class t4 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int []arr=new int[6];
        int max=0,min=100,sum=0;
        for (int i = 0; i < arr.length; i++) {
            System.out.print("输入第"+(i+1)+"个评委的成绩：");
            arr[i]= sc.nextInt();
            sum+=arr[i];
            if(max<arr[i]) max =arr[i];
            if(min>arr[i]) min = arr[i];
        }
        sum=sum-min-max;
        double avg= 1.0*sum/4;
        System.out.print("该选手的平均成绩为："+avg);
    }
}
